package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaiLikeMapper;
import com.ruoyi.system.domain.BaiLike;
import com.ruoyi.system.service.IBaiLikeService;

/**
 * 点赞Service业务层处理
 * 
 * @author saruri
 * @date 2024-09-16
 */
@Service
public class BaiLikeServiceImpl implements IBaiLikeService 
{
    @Autowired
    private BaiLikeMapper baiLikeMapper;

    /**
     * 查询点赞
     * 
     * @param id 点赞主键
     * @return 点赞
     */
    @Override
    public BaiLike selectBaiLikeById(Long id)
    {
        return baiLikeMapper.selectBaiLikeById(id);
    }

    /**
     * 查询点赞
     *
     * @param baiLike 点赞
     * @return 点赞
     */
    @Override
    public BaiLike selectBaiLike(BaiLike baiLike)
    {
        return baiLikeMapper.selectBaiLike(baiLike);
    }

    @Override
    public int getLikeCountByConditions(BaiLike baiLike) {
        // 调用 Mapper 层查询
        return baiLikeMapper.selectLikeCountByConditions(baiLike);
    }


    @Override
    public BaiLike selectByUserAndUrl(BaiLike baiLike) {
        return baiLikeMapper.selectByUserAndUrl(baiLike);
    }

    /**
     * 查询点赞列表
     * 
     * @param baiLike 点赞
     * @return 点赞
     */
    @Override
    public List<BaiLike> selectBaiLikeList(BaiLike baiLike)
    {
        return baiLikeMapper.selectBaiLikeList(baiLike);
    }

    /**
     * 新增点赞
     * 
     * @param baiLike 点赞
     * @return 结果
     */
    @Override
    public int insertBaiLike(BaiLike baiLike)
    {
        return baiLikeMapper.insertBaiLike(baiLike);
    }

    /**
     * 修改点赞
     * 
     * @param baiLike 点赞
     * @return 结果
     */
    @Override
    public int updateBaiLike(BaiLike baiLike)
    {
        return baiLikeMapper.updateBaiLike(baiLike);
    }

    /**
     * 批量删除点赞
     * 
     * @param ids 需要删除的点赞主键
     * @return 结果
     */
    @Override
    public int deleteBaiLikeByIds(Long[] ids)
    {
        return baiLikeMapper.deleteBaiLikeByIds(ids);
    }

    /**
     * 删除点赞信息
     * 
     * @param id 点赞主键
     * @return 结果
     */
    @Override
    public int deleteBaiLikeById(Long id)
    {
        return baiLikeMapper.deleteBaiLikeById(id);
    }
//TAG_START:BaiLike_Mine_list

//BaiLike服务实现	
@Override
public List<BaiLike> selectBaiLikeListMine(BaiLike baiLike) {
    return baiLikeMapper.selectBaiLikeListMine(baiLike);
}

//TAG_END:BaiLike_Mine_list


}
